package net.hn.hnms.biz.safety.wind.Service;

import net.hn.hnms.biz.safety.wind.Dao.PositionDao;
import net.hn.hnms.biz.safety.wind.entity.PositionEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 智呈物联 nzw
 * @date 2022/12/21
 */

@Service
public class PositionService {

    private PositionDao positionDao;

    @Autowired
    public void setPositionDao(PositionDao positionDao) {
        this.positionDao = positionDao;
    }

    public String getPositionName(Long positionId){
        PositionEntity positionEntity = new PositionEntity();

        if (positionDao.getById(positionId)!=null)
        positionEntity = positionDao.getById(positionId);

        return positionEntity.getPositionName();
    }
}
